package com.ccys.doctor;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableScheduling;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * Doc启动
 */
@ServletComponentScan // 扫描使用注解方式的servlet
@EnableScheduling//启用定时任务
@SpringBootApplication(scanBasePackages = {"com.ccys"})
@MapperScan(basePackages = {"com.ccys.*.mapper"})
@Slf4j
@EnableDiscoveryClient
@EnableFeignClients
public class DoctorApplication extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(DoctorApplication.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(DoctorApplication.class, args);
    }
}
